import React, { Component } from 'react';
import style from'./about.less'
import { connect } from 'react-redux'

class About extends Component {
    render() {
        console.log(this.props)
        const {posts} = this.props
        return (
            < div style={style}  className='about'>
                <div className="container">
                    <h3 className="center"> About页面</h3>
                    <p>欢迎来到关于我们页面！</p>
                    <ul>
                    {posts.map(item=><li key={item.id}>标题--{item.title}--内容--{item.content}</li>)}
                    </ul>
                </div>
            </div >
        )
    }
}

const mapStateToProps = (state) => {
    return {
        posts: state.posts
    }
}

export default connect(mapStateToProps)(About)